+2008-01-10 Sven Neumann <sven@gimp.org>
+
+ * extensions/Makefile.am: extended CFLAGS so that config.h can be
+ included.
+
+ * extensions/*.c: fixed up includes.
+
+ * extensions/gegl-fixups.c: use linear <-> gamma conversions from
+ base/util.c.
+
2008-01-07 Kevin Cozens <kcozens@cvs.gnome.org>
* babl/babl-extension.c (babl_extension_load_dir): Reverted previous
* <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
+#include <math.h>
#include <string.h>
+
#include "babl.h"
-#include "util.h"
+
int init (void);
all-local: $(SOBJS)
-CFLAGS += -I $(top_srcdir)/babl -I $(top_srcdir)/extensions -fPIC
+CFLAGS += \
+ -I $(top_srcdir) \
+ -I $(top_srcdir)/babl \
+ -I $(top_srcdir)/extensions \
+ -fPIC
LDFLAGS += -shared
* Copyright 2003, 2004, 2005, 2007 Øyvind Kolås <pippin@gimp.org>
*/
-#include "babl.h"
-
-#define INLINE inline
-
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-
/*
* Implemented according to information read from:
*
* TODO: error diffusion,
*/
-#define BABL_USE_SRGB_GAMMA
-
-#ifdef BABL_USE_SRGB_GAMMA
+#include "config.h"
-static inline double
-linear_to_gamma_2_2 (double value)
-{
- if (value > 0.0030402477F)
- return 1.055F *pow (value, (1.0F / 2.4F)) - 0.055F;
- return 12.92F * value;
-}
-
-static inline double
-gamma_2_2_to_linear (double value)
-{
- if (value > 0.03928F)
- return pow ((value + 0.055F) / 1.055F, 2.4F);
- return value / 12.92F;
-}
+#include "babl.h"
+#include "base/util.h"
-#else
- #define linear_to_gamma_2_2(value) (pow ((value), (1.0F / 2.2F)))
- #define gamma_2_2_to_linear(value) (pow ((value), 2.2F))
-#endif
+#define INLINE inline
/* lookup tables used in conversion */
/*
* This file was part of gggl, it implements a variety of pixel conversion
* functions that are usable with babl, the file needs more cleanup, and
- * doesn't return the number of samples processed as a long, like it's supposed to.
+ * doesn't return the number of samples processed as a long, like it's
+ * supposed to.
*
* GGGL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
*/
+#include "config.h"
+
+#include <math.h>
+#include <string.h>
+
#include "babl.h"
+
#define INLINE inline
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
/*
* Implemented according to information read from:
* Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
*/
-#include "babl.h"
-
-#define INLINE inline
+#include "config.h"
#include <math.h>
-#include <stdio.h>
#include <string.h>
+#include "babl.h"
+
+
+#define INLINE inline
+
/*
* Implemented according to information read from:
*
* <http://www.gnu.org/licenses/>.
*/
-#include <string.h>
+#include "config.h"
+
#include <math.h>
-#include <assert.h>
+#include <string.h>
+
#include "babl.h"
-#include "util.h"
-static long
-rgba_to_cmyk (char *src,
- char *dst,
- long n);
-static long
-cmyk_to_rgba (char *src,
- char *dst,
- long n);
+static long rgba_to_cmyk (char *src,
+ char *dst,
+ long n);
+
+static long cmyk_to_rgba (char *src,
+ char *dst,
+ long n);
int init (void);